load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "decentralized.go",
        "migration.go",
        "migrationpolicy.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/virt-controller/watch/migration",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/apimachinery/patch:go_default_library",
        "//pkg/controller:go_default_library",
        "//pkg/monitoring/metrics/common/workqueue:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/storage/backend-storage:go_default_library",
        "//pkg/storage/types:go_default_library",
        "//pkg/tpm:go_default_library",
        "//pkg/util:go_default_library",
        "//pkg/util/migrations:go_default_library",
        "//pkg/util/trace:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-controller/services:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/opencontainers/selinux/go-selinux:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
        "//vendor/k8s.io/client-go/tools/record:go_default_library",
        "//vendor/k8s.io/client-go/util/workqueue:go_default_library",
        "//vendor/k8s.io/utils/trace:go_default_library",
        "//vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "migration_suite_test.go",
        "migration_test.go",
    ],
    embed = [":go_default_library"],
    race = "on",
    deps = [
        "//pkg/controller:go_default_library",
        "//pkg/controller/testing:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/testutils:go_default_library",
        "//pkg/util/migrations:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-config/featuregate:go_default_library",
        "//pkg/virt-controller/services:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/client-go/api:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubevirt/fake:go_default_library",
        "//staging/src/kubevirt.io/client-go/networkattachmentdefinitionclient/fake:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/onsi/gomega/gstruct:go_default_library",
        "//vendor/github.com/onsi/gomega/types:go_default_library",
        "//vendor/go.uber.org/mock/gomock:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/api/storage/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library",
        "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
        "//vendor/k8s.io/client-go/tools/record:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
        "//vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue:go_default_library",
    ],
)
